<% breadcrumb :specify_lottery_prize_attendee, @event_lottery_prize, @event_lottery_prize_item %>

<div class="row">
  <div class="col-lg-12">
    <div class="ibox float-e-margins">
      <div class="ibox-title">
        <h5>指定中奖人管理-<%= @event_lottery_prize.name%>-<%= @event_lottery_prize_item.name %></h5>
      </div>
      <div class="ibox-content">
        <div class="row">
          <div class=" col-md-offset-6 col-md-6">
            <%= form_tag(event_event_lottery_prize_event_lottery_prize_item_add_specify_attendee_lottery_path(current_event, @event_lottery_prize, @event_lottery_prize_item), method: "post") do %>
              <div class="input-group">
                <input type="text" name="attendee_name" class="form-control" placeholder="请输入用户名...">
                <span class="input-group-btn">
                  <button class="btn btn-primary" type="submit">添加</button>
                </span>
              </div>
            <% end %>
          </div>
        </div>
        <div class="row">
          <table class="table table-striped table-hover">
            <% @lottery_prizes.each do |lottery| %>
              <tr>
                <td><%= lottery.attendee.name %></td>
                <td><%= lottery.attendee.mobile %></td>
                <td><%= link_to '移除', event_event_lottery_prize_event_lottery_prize_item_remove_specify_attendee_lottery_path(current_event, @event_lottery_prize, @event_lottery_prize_item, attendee_id: lottery.attendee.id), method: :delete, data: { confirm: 'are you sure?' }%>
                </td>
              </tr>
            <% end %>
          </table>
        </div>
      </div>
    </div>
  </div>
</div>
